FROM ubuntu:16.04

ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV LANG C.UTF-8

COPY sources.list /etc/apt
RUN apt-get clean && apt-get update && apt-get install -y gcc make zlib1g-dev libssl-dev \
   && rm -rf /var/lib/apt/lists/*
COPY . /data/
RUN cd /data \
  && ./Python-3.6.6/configure --with-ssl; make ;make install \
  && ln -s /usr/local/bin/python3 /usr/bin/python \
  && ln -s /usr/local/bin/pip3 /usr/bin/pip \
  && rm -rf /data